package com.he.abstractfactorymodel.factory.abstractfactory;

import com.he.abstractfactorymodel.factory.PeopleFactory;
import com.he.abstractfactorymodel.product.People;

public abstract class Peoplefactory implements PeopleFactory {
    protected People createPoeple(Class aClass) {
        try {
            return (People) aClass.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        throw new AssertionError("请传入People接口的实现类！");
    }

}
